public class Dog {
    int age;
    String name;
    public static void eat(){
        System.out.println("吃狗粮");
    }
     public static void speak(){
        System.out.println("狗叫");

}

    public static void main(String[] args) {
        Dog dog=new Dog();
        dog.age=2;
        dog.name="旺财";
        dog.speak();
        dog.eat();
        System.out.println(dog.age);
        System.out.println(dog.name);

    }
}
